#include "IntWrap.h"
namespace clojure_lang {
IntWrap::IntWrap(int i)
{
    this->val = i;
}

IntWrap::IntWrap(int i, IPersistentMap *meta)
{
    this->_meta = meta;
    this->val = i;
}

IntWrap::operator double()
{
    return (double)val;
}
IntWrap::operator float()
{
    return (float)val;
}
IntWrap::operator int()
{
    return (int)val;
}
IntWrap::operator long()
{
    return (long)val;
}
IntWrap::operator QString()
{
    return QString(val);
}

QString IntWrap::typeName()
{
    return QString("int");
}
int IntWrap::getHashCode()
{
    return val;
}
bool IntWrap::equals(CjObject *obj)
{
    return false;
}
int IntWrap::getVal()
{
    return val;
}

bool IntWrap::equals(IntWrap *obj)
{
    return obj->getVal() == val;
}
CjObject *IntWrap::withMeta(IPersistentMap *meta)
{
    if (meta == _meta)
        return this;
    return (new IntWrap(this->val, meta));
}
}
